Skip to content

[Placeholder] Allow executing Placeholders in the execution engine. #1597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 9, 2018

Conversation

nadavrot
Copy link
Contributor

@nadavrot nadavrot commented Sep 8, 2018

Description:
Implement the logic for executing Placeholders in the execution engine.
This commit changes the backend interface and adds the ability to pass
Placeholder variables in addition to Variables. This change breaks the
out-of-tree backends.

This is the first step in adding support for placeholder variables in
the execution engine. The commit adds support to the interpreter but not
to the OpenCL and CPU backends.

Testing: Ran the local tests (ninja check)
Documentation: updated doxygen comments.

Related to #1586 and #1334.

class Tensor;

/// Maps placeholders to the tensors that back them.
using PlaceholderMap = std::unordered_map<Placeholder *, Tensor *>;

This comment was marked as off-topic.

@nadavrot
Copy link
Contributor Author

nadavrot commented Sep 9, 2018

The second part of this PR is #1601, which adds CPU and OpenCL support for the changes to the execution engine.

@nadavrot nadavrot requested a review from hegemanjwh2 September 9, 2018 05:24
Copy link
Contributor

@hegemanjwh2 hegemanjwh2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

assert(placeholders.size() == inputs.size() &&
"Invalid number of placeholders");

for (int i = 0, e = placeholders.size(); i < e; i++) {

This comment was marked as off-topic.

Implement the logic for executing Placeholders in the execution engine.
This commit changes the backend interface and adds the ability to pass
Placeholder variables in addition to Variables. This change breaks the
out-of-tree backends.

This is the first step in adding support for placeholder variables in
the execution engine. The commit adds support to the interpreter but not
to the OpenCL and CPU backends.
@nadavrot nadavrot force-pushed the compile_placeholders branch from db2cdbf to 32eb209 Compare September 9, 2018 06:01
@nadavrot nadavrot merged commit 4dd7052 into pytorch:master Sep 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants